#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int is_left_move(char* s1, char* s2)
{
	int len = strlen(s1);
	for(int j=0;j<len;j++)
	{
		char tmp = *s1;
		for (int i = 0; i < len - 1; i++)
		{
			*(s1 + i) = *(s1 + i + 1);
		}
		*(s1 + len - 1) = tmp;
		if (strcmp(s1, s2) == 0)
			return 1;
	}
	return 0;
}
int main()
{
	char arr1[] = "abcdef";
	char arr2[] = "cdefab";
	int ret = is_left_move(arr1, arr2);
	if (ret == 1)
		printf("Yes\n");
	else
		printf("No\n");
	return 0;
}
